/**
 * Created by rockyren on 14-8-27.
 */

define(function(require,exports,module){
  /**
   * @class 颜色类
   * 以rgba形式表示
   */
  function ColorHandle(red,green,blue,alpha) {
    this.red = red;
    this.green = green;
    this.blue = blue;
    this.alpha = alpha;
  }

  module.exports = ColorHandle;

  /**
   * @method 判断两个颜色是否相等
   * @param other_color:与当前颜色比较的其他颜色
   */

  ColorHandle.prototype.isSameColor = function(other_color) {
    return this.red == other_color.red &&
      this.green == other_color.green &&
      this.blue == other_color.blue ;
    //&& this.alpha == other_color.alpha;
  }


  /**
   * @method 以字符串形式输出颜色
   * @returns {string} rgb形式的颜色字符串
   */
  ColorHandle.prototype.ColorString = function() {
    return "{red:" + this.red + ", green:"	+ this.green + ", blue:" +
      this.blue + ", alpha:" + this.alpha + "}";
  }


});